# 一键部署脚本 - 配置版
param(
    [string]$ServerIP = "10.3.255.92",
    [string]$Username = "administrator",  # 修改为服务器用户名
    [string]$Password = ""  # 这里可以设置默认密码
)

# 如果密码为空，提示输入
if ([string]::IsNullOrEmpty($Password)) {
    $Password = Read-Host "请输入服务器密码" -AsSecureString | ConvertFrom-SecureString -AsPlainText
}

# 执行部署
$deployPath = Join-Path $PSScriptRoot "remote-deploy.ps1"

if (Test-Path $deployPath) {
    & $deployPath -Deploy -ServerIP $ServerIP -Username $Username -Password $Password
} else {
    Write-Error "部署脚本不存在: $deployPath"
}